package com.example.demo.conf;

import java.time.Duration;
import java.time.temporal.ChronoUnit;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.convert.DurationUnit;

/**
 * @author yujie
 * @create 2018-04-26 下午3:51
 **/
@ConfigurationProperties(prefix = "my.test")
public class TestProperties {

    @DurationUnit(ChronoUnit.MILLIS)
    private Duration ttl;

    public Duration getTtl() {
        return ttl;
    }

    public void setTtl(Duration ttl) {
        this.ttl = ttl;
    }
}
